package com.git.bds.mr.login.model.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author 成大事
 * @since 2022-09-17 21:05:28
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("login")
@ApiModel(value = "Login", description = "")
public class Login extends Model<Login> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("账号")
    @TableField("account")
    private String account;

    @ApiModelProperty("密码")
    @TableField("password")
    private String password;

    @ApiModelProperty("所属id")
    @TableField("belong_id")
    private Long belongId;


    @ApiModelProperty("角色类型")
    @TableField("role_type")
    private Integer roleType;

    public static final String ID = "id";

    public static final String ACCOUNT = "account";

    public static final String PASSWORD = "password";

    public static final String BELONG_ID = "belong_id";

    public static final String ROLE_TYPE = "role_type";

    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
